/*年轻人，只管向前看，不要管自暴自弃者的话*/
package com.composetest.page.home.navigation

import androidx.navigation.NavController
import androidx.navigation.NavGraphBuilder
import com.composetest.page.home.HomeRoute
import com.composetest.ui.navigation.myComposable

const val HOME_ROUTE = "home"

/**
 * 跳转
 */
fun NavController.navigationToHome(): Unit {
    navigate(HOME_ROUTE)
}

/**
 * 配置导航
 */
fun NavGraphBuilder.homeScreen(toProductDetail: (String) -> Unit): Unit {
    myComposable(HOME_ROUTE) {
        HomeRoute(toProductDetail = toProductDetail)
    }
}
